package com.basic.business;

import com.basic.business.common.token.TokenRefresh;
import com.basic.business.order.server.GetOrdersDataServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Slf4j
@Component
public class Run implements CommandLineRunner {

    @Resource
    private GetOrdersDataServer getOrderDataServer;

    @Resource
    private TokenRefresh tokenRefresh;

    @Override
    public void run(String... args) {
        // 刷新会话
        tokenRefresh.init();

        getOrderDataServer.predecessors();

    }

}
